<template>
  <div id="app">
    <transition name="fade"
                mode="out-in">
      <router-view v-if="IsRouterAlive"></router-view>
    </transition>
  </div>
</template>

<script>
export default {
  name: 'App',
  provide () {
    return {
      reload: this.reload
    }
  },
  data () {
    return {
      IsRouterAlive: true
    }
  },
  created () {
  },
  watch: {

  },
  methods: {
    reload () {
      this.$$nextTick(function () {
        this.IsRouterAlive = true;
      })
    }
  }
}
</script>
<style>
body {
  font-size: 14px;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
    Microsoft YaHei, SimSun, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  margin: 0px;
  padding: 0px;
}
.fade-enter-active,
.fade-leave-active {
  transition: all 0.2s ease;
}

.fade-enter,
.fade-leave-active {
  opacity: 0;
}
</style>
